package com.probiz.estore.exports.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.probiz.estore.customer.service.CustomerManager;
import com.probiz.estore.exports.service.CustomerExportManager;

public class CustomerExportManagerImpl extends BaseExportManagerImpl implements CustomerExportManager {
	
	private CustomerManager customerManager;
	
	public void setCustomerManager(CustomerManager customerManager) {
		this.customerManager = customerManager;
	}

	@Override
	public List<Object> getDataSource(String[] ids) {
		List list = new ArrayList();
		if(ids != null && ids.length>0){
			for (String id : ids) {
				Object o = this.customerManager.loadById(Integer.valueOf(id));
				list.add(o);
			}
		} else {
			list = this.customerManager.getListByDeleted();
		}
		return list;
	}

	
}
